package com.partners.dao.dto;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import org.apache.ibatis.javassist.bytecode.LineNumberAttribute;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * @author liangyongle
 * @date 2018-12-28
 */
@Data
public class ProductInputDTO {

    private Integer id;

    @NotNull(message="类型不能为空") @NotBlank
    private Integer classId;

    @NotNull(message="标题不能为空") @NotBlank
    private String title;

    @NotNull(message="主图不能为空") @NotBlank
    private String pic;

    @NotNull(message="积分不能为空") @NotBlank
    private Integer point;

    @NotNull(message="价格不能为空") @NotBlank
    private BigDecimal price;

    @NotNull(message="库存不能为空") @NotBlank
    private Integer stock;

    private Byte isup;

    private Integer exchange;

    private Integer addtime;

    @NotNull(message="详情不能为空") @NotBlank
    private String content;

    private List<Map<String,Object>> piclist;

    public static class PicList{

        private Integer id;

        @NotNull(message="图片不能为空") @NotBlank
        private Integer pic;

    }

}
